package com.jscm.openselect;

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.TextField;

/**
 * 数据内容
 */
public class SelectTextOffset {
    public static TextField textField = new TextField();
    static {
        init();
    }

    private static void init() {
        textField.setPrefWidth(100);
        textField.setPrefHeight(40);
        textField.setPromptText("输入HEX偏移");
        textField.setFocusTraversable(false);
        textField.textProperty().addListener(new ChangeListener<String>() {
            @Override
            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
                textField.setText(newValue.toUpperCase());
            }
        });
    }
}
